package cn.lyh.iotmanage.dao;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.util.Date;

import lombok.Data;

/**
 * @author lyh
 * @version 1.0
 * @since 2021/5/16
 */

/**
 * 设备会话订阅信息表
 */
@Data
@TableName(value = "emq_sessionsub")
public class EmqSessionsubDao {
    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    /**
     * 设备连接的用户名
     */
    @TableField(value = "username")
    private String username;

    /**
     * QOS类
     */
    @TableField(value = "qos")
    private Integer qos;

    /**
     * 订阅的主题
     */
    @TableField(value = "topic_name")
    private String topicName;

    /**
     * 设备会话订阅连接时间
     */
    @TableField(value = "sub_time")
    private Date subTime;

    /**
     * clientId
     */
    @TableField(value = "clientid")
    private String clientid;

    public static final String COL_ID = "id";

    public static final String COL_USERNAME = "username";

    public static final String COL_QOS = "qos";

    public static final String COL_TOPIC_NAME = "topic_name";

    public static final String COL_SUB_TIME = "sub_time";

    public static final String COL_CLIENTID = "clientid";
}